package com.party.core.model.analysis;

import com.party.core.model.BaseModel;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: party-temp
 * @description: 统计用户
 * @author: Huaqunhao
 * @create: 2018-08-01 15:02
 **/
public class StatisticsUser extends BaseModel implements Serializable {
    private static final long serialVersionUID = -4118766664274168319L;

    //系统会员编号
    private String memberId;
    //用户名称
    private String name;
    //用户图像
    private String logo;
    //统计用户编号
    private String userId;
    //上次登录的时间（一天只记录一次）
    private Date endDate;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        StatisticsUser that = (StatisticsUser) o;

        if (memberId != null ? !memberId.equals(that.memberId) : that.memberId != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (logo != null ? !logo.equals(that.logo) : that.logo != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        return endDate != null ? endDate.equals(that.endDate) : that.endDate == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (logo != null ? logo.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "StatisticsUser{" +
                "memberId='" + memberId + '\'' +
                ", name='" + name + '\'' +
                ", logo='" + logo + '\'' +
                ", userId='" + userId + '\'' +
                ", endDate=" + endDate +
                '}';
    }
}
